package com.tarim.streetdance.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.tarim.streetdance.vo.Criteria;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

public class User extends Criteria implements Serializable {
    private Long id;

    private Integer userType;

    private String userName;

    private String userCode;

    private String phoneNumber;

    private String email;

    private Integer sex;

    @JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date birthday;

    private String password;

    private Integer disableSend;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:SS",timezone="GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:SS")
    private Date enableSendTime;

    private Date modifyTime;

    private Date createTime;

    private Integer status;

    private Integer loginErrorNum;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:SS",timezone="GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:SS")
    private Date relieveTime;

    private Integer dr;

    private String avatarUrl;

    private Integer collegeId;

    private String collegeName;

    public User(Long id, Integer userType, String userName, String userCode, String phoneNumber, String email, Integer sex, Date birthday, String password, Integer disableSend, Date enableSendTime, Date modifyTime, Date createTime, Integer status, Integer loginErrorNum, Date relieveTime, Integer dr, String avatarUrl, Integer collegeId, String collegeName) {
        this.id = id;
        this.userType = userType;
        this.userName = userName;
        this.userCode = userCode;
        this.phoneNumber = phoneNumber;
        this.email = email;
        this.sex = sex;
        this.birthday = birthday;
        this.password = password;
        this.disableSend = disableSend;
        this.enableSendTime = enableSendTime;
        this.modifyTime = modifyTime;
        this.createTime = createTime;
        this.status = status;
        this.loginErrorNum = loginErrorNum;
        this.relieveTime = relieveTime;
        this.dr = dr;
        this.avatarUrl = avatarUrl;
        this.collegeId = collegeId;
        this.collegeName = collegeName;
    }

    public User() {
        super();
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getUserType() {
        return userType;
    }

    public void setUserType(Integer userType) {
        this.userType = userType;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName == null ? null : userName.trim();
    }

    public String getUserCode() {
        return userCode;
    }

    public void setUserCode(String userCode) {
        this.userCode = userCode == null ? null : userCode.trim();
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber == null ? null : phoneNumber.trim();
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email == null ? null : email.trim();
    }

    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password == null ? null : password.trim();
    }

    public Integer getDisableSend() {
        return disableSend;
    }

    public void setDisableSend(Integer disableSend) {
        this.disableSend = disableSend;
    }

    public Date getEnableSendTime() {
        return enableSendTime;
    }

    public void setEnableSendTime(Date enableSendTime) {
        this.enableSendTime = enableSendTime;
    }

    public Date getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getLoginErrorNum() {
        return loginErrorNum;
    }

    public void setLoginErrorNum(Integer loginErrorNum) {
        this.loginErrorNum = loginErrorNum;
    }

    public Date getRelieveTime() {
        return relieveTime;
    }

    public void setRelieveTime(Date relieveTime) {
        this.relieveTime = relieveTime;
    }

    public Integer getDr() {
        return dr;
    }

    public void setDr(Integer dr) {
        this.dr = dr;
    }

    public String getAvatarUrl() {
        return avatarUrl;
    }

    public void setAvatarUrl(String avatarUrl) {
        this.avatarUrl = avatarUrl == null ? null : avatarUrl.trim();
    }

    public Integer getCollegeId() {
        return collegeId;
    }

    public void setCollegeId(Integer collegeId) {
        this.collegeId = collegeId;
    }

    public String getCollegeName() {
        return collegeName;
    }

    public void setCollegeName(String collegeName) {
        this.collegeName = collegeName;
    }
}